// run: $exec < input > g.dot
#include <iostream>
#include <vector>

std::vector<std::pair<int, int> > ans;

int alloc = 2;

void print(int x, int y)
{
	ans.push_back(std::make_pair(x, y));
}

int main()
{
	std::ios::sync_with_stdio(false);
	int k; std::cin >> k;
	if (!(k & 1)) { std::cout << "NO\n"; return 0; }
	if (k == 1) {
		std::cout << "YES\n2 1\n1 2\n";
		return 0;
	}
	std::cout << "YES\n";
	for (int i = 0; i < (k - 1) / 2; i++) {
		std::vector<int> v;
		for (int i = 0; i < k; i++)
			v.push_back(alloc++);
		print(1, v[0]);
		print(1, v[k - 1]);
		for (int i = 0; i < k - 1; i++)
			print(v[i], v[i + 1]);
		std::vector<int> vv;
		for (int i = 0; i < k - 2; i++)
			vv.push_back(alloc++);
		for (int i = 0; i < k - 2; i++)
			for (int j = 0; j < k; j++) {
				print(vv[i], v[j]);
			}
	}
	int now = alloc++;
	print(now, 1);
	for (int i = 0; i < (k - 1) / 2; i++) {
		std::vector<int> v;
		for (int i = 0; i < k; i++)
			v.push_back(alloc++);
		print(now, v[0]);
		print(now, v[k - 1]);
		for (int i = 0; i < k - 1; i++)
			print(v[i], v[i + 1]);
		std::vector<int> vv;
		for (int i = 0; i < k - 2; i++)
			vv.push_back(alloc++);
		for (int i = 0; i < k - 2; i++)
			for (int j = 0; j < k; j++) {
				print(vv[i], v[j]);
			}
	}
	std::cout << alloc - 1 << " " << ans.size() << "\n";
	for (int i = 0; i < (int)ans.size(); i++)
		std::cout << ans[i].first << " " << ans[i].second << "\n";
}

